<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
   <title>CSS OM: media.type</title>
   <meta name="description" content="Test: CSSOM media interface: media type property">
  <style type="text/css">

   @media  screen and (width: 100px) {
      p.test { background-color: #6f6; }
 }
  

  </style>
 </head>
<body>
    
<div> Interface media: type </div>
<p>Test passes if the word "PASS" appears below.</p>
<div id="testresult">Fail</div>
<script type="text/javascript">
    try
     {
      var isScreen = media.type == "screen";
      if(isScreen == true)
        {
         document.getElementById("testresult").innerHTML = "PASS";
        }
      else
        {
          document.getElementById("testresult").innerHTML = "FAIL";
        }
      }
   catch (ex)
    {
      document.getElementById("testresult").innerHTML = "FAIL";
    }

</script>    
</body>
</html>